package com.appsindy.common.vo;

import java.util.LinkedHashSet;
import java.util.Set;

public class UserGroupVO {
    private int id;
    private String groupcode;
    private String groupname;
    private Set<UserVO> users = new LinkedHashSet<UserVO>();
    
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    
    public String getGroupcode() {
        return groupcode;
    }
    public void setGroupcode(String groupcode) {
        this.groupcode = groupcode;
    }
    
    public String getGroupname() {
        return groupname;
    }
    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }
    
    public void addUsers(UserVO aUsers) {
        this.getUsers().add(aUsers);
    }
    
    public void removeUsers(UserVO aUsers) {
        this.getUsers().remove(aUsers);
    }
    
    public UserVO[] toUsersArray() {
    	UserVO[] lUsers_Temp = new UserVO[this.getUsers().size()];
        this.getUsers().toArray(lUsers_Temp);
        return lUsers_Temp;
    }
    
    public Set<UserVO> getUsers() {
        return users;
    }
    public void setUsers(Set<UserVO> users) {
        this.users = users;
    }
    
}
